/**
 * 
 * @class NG.command.Request
 * @extends Ext.util.Observable
 */
NG.command.GetMap = Ext.extend(NG.command.Request, {
	
	imageFormat: IMAGEFORMAT_PNG,
	
	bgColor: "0xFFFFFF",

	workspaceName: "",
	
	srs: "",
	
	bbox: "",
	
	width: 256,
	
	height: 256,
	
	categoryOffFilter:"",
	
	constructor: function(config){
		config = config || {};
		config.serviceName = XSN_NETCAD_GETMAP;
		NG.command.GetMap.superclass.constructor.call(this, config);
	},

	/**
	 * Used for obtaining xml data <br>
	 * requesting map
	 * 
	 * @return {String} formed xml structure
	 */
	getDataXML: function(){
    	var XML = new XMLWriter();
    	XML.BeginNode(NG.constants.GetMap.XML_Getmapex);
        	XML.BeginNode(NG.constants.GetMap.XML_Map);
        	XML.Node(NG.constants.GetMap.XML_Workspace, this.workspaceName);
        	XML.Node(NG.constants.GetMap.XML_SRS, this.srs);
        	XML.Node(NG.constants.GetMap.XML_BBOX, this.bbox);
        	var width = app.getSettings().getTileSize();
        	if (!Ext.isNumber(width))
        		width = 256;
        	var height = width;
        	XML.Node(NG.constants.GetMap.XML_Width, width);
        	XML.Node(NG.constants.GetMap.XML_Height, height);
        	XML.Node(NG.constants.GetMap.XML_Format, this.imageFormat);
        	XML.Node(NG.constants.GetMap.XML_BGColor, this.bgColor);
        	XML.Node(NG.constants.GetMap.XML_Antialias, "");
    	XML.EndNode();
    	XML.BeginNode(NG.constants.GetMap.XML_Params);
    		XML.Node(NG.constants.GetMap.XML_Olcekbar, "");
    		XML.Node(NG.constants.GetMap.XML_Copyright, "");
    		XML.Node(NG.constants.GetMap.XML_JPGQuality, "");
    		XML.Node(NG.constants.GetMap.XML_CategoryOFF_Filter, this.categoryOffFilter);
    	XML.EndNode();
    	XML.Close();
    	return XML.ToString();
	},
	
	getResponse: function(xmlData){
		
	}
});